<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
	</head>
	<body>
		<button id="button">按钮1</button>
		<button class="button">按钮2</button>
		<button name="button">按钮3</button>
		<button>按钮4</button>
		<button type="button">按钮5</button>
		<button>按钮6</button>


		
	</body>
	
	<script type="text/javascript">
		console.log(document.getElementById("button"));
		console.log(document.getElementsByClassName("button")[0]);
		console.log(document.getElementsByName("button")[0]);
		console.log(document.getElementsByTagName("button")[3])
		console.log(document.querySelector("button[type]"))//选择具有type属性的button
		console.log(document.querySelectorAll("button")[5])
	</script>
</html>
